<?php

/***  DOCUMENTATION LAYER

Baffle Class Debugging Test

Last Update: Aug 2007
	
DESCRIPTION
	test error reporting
	
NOTES
		
***/

$_tx0 = microtime();

// Test Name
$test_name = 'debug ceo kernel';

// Include Files
require_once('../www/ceo.project_driver.inc.php');

// Variable Declarations
#$foo = 'bar';

// Simple Test of Class
if ( 1 )
{
  $Test = new CeoFramework($debug=1, 'CeoFramework');
  $Test->print_d('testing CeoFramework error reporting');
 
  // error settings
  $Test->Err->filter_trivial = 0;
  $Test->Err->email_alpha = 1;
  $Test->Err->kill_logging = 0;
  $Test->Err->max_log_size = 3000;        // 3 kb
  $Test->Err->session_email_delay = 180;  // 3 min

  // load framework
  $Test->PATH['datasafe'] = $Test->super_root . '__DEV'.$Test->DS.'nudgewink.inc.php';
  $Test->load_framework();
  
  // Testing with Gmail
  $Test->use_smtp = 1;
  $Test->smtp_host = 'smtp.att.yahoo.com';
  $Test->Mailer->Port = 25;
  $Test->smtp_user = $CEO_SAFE['smtp_user'];
  $Test->smtp_password = $CEO_SAFE['smtp_password'];

  // let the errors begin!  
  $Test->print_d('user notice');
  $Test->e('test notice', E_USER_NOTICE);
  
  $Test->print_d('user warning');
  $Test->e('test warning', E_USER_WARNING);
  
  $Test->print_d('user error');
  $Test->e('test error', E_USER_ERROR);
  
  $Test->print_d('inner function warning');
  function inner_e() { global $Test; $Test->e('inner function warning', E_USER_WARNING); return; }
  inner_e();
}


// Footer
$_txn = microtime();
$stx = number_format(((substr($_txn,0,9)) + (substr($_txn,-10)) - (substr($_tx0,0,9)) - (substr($_tx0,-10))),4); 
echo "<h6>test '$test_name' complete in $stx s</h6>";

?>
